/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2011.03.31                                          *
 *                                                                       *
 *************************************************************************/

#ifndef FreeMAPs_include_COMMON_enum_Axis_h
#define FreeMAPs_include_COMMON_enum_Axis_h

#include "FreeMAPsConfig.h"

//C++ headers
#include <string>

namespace FreeMAPs
{

//forward declaration
class InputDatabase;

enum class Axis
{
    X = 0,   ///< along x direction
    Y,       ///< along y direction
    Z,       ///< along z direction

    INVALID_VALUE
};

namespace Utilities
{

/**
 * get X, Y, Z from 0, 1, 2
 */
std::string
int_to_axis (
    const int num,
    const bool use_capital = false);

/**
 * get 0, 1, 2 from X, Y, Z
 */
int
axis_to_int (
    const std::string& axis);

/**
 * check if the axis is rational.
 * for example, in 2D case, the axis can NOT be Z.
 */
void
check_axis (
    const InputDatabase* db,
    const std::string& key,
    const Axis axis);

}

}

#include "COMMON/enum/Axis.inl"

#endif
